package br.com.gaacorp.sai.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

@Entity
@Table(name = "tab_university")
public class University extends BaseObject implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6701590508783954396L;
	private Long universityId;
	private String name;
	private String description;

	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof University)) {
			return false;
		}

		final University university1 = (University) o;

		return this.hashCode() == university1.hashCode();
	}

	@Column(length = 64)
	public String getDescription() {
		return description;
	}

	@Column(length = 20)
	public String getName() {
		return name;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getUniversityId() {
		return universityId;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setUniversityId(Long universityId) {
		this.universityId = universityId;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("name", this.name).append("description",
						this.description).toString();
	}

}
